//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CGeometryLoader.h>
///	@path	~/src/scene/loader/
///	@date	2008/04/13
///	@desc	Geometry loaders.

#include "xeres.h"

#include "graphics/IGeometry.h"
#include "graphics/IRenderer.h"

#include "scene/resource/ILoader.h"
#include "scene/resource/ResourceLoader.h"

namespace xeres {

	/*! 
		\class	CSimpleGeometryLoader
		\brief	For simple geometry load.
				Using direct declaration to present constant shapes.
	*/
	class CSimpleGeometryLoader : public IGeometryLoader
	{
	public:

		/// \ctor
		CSimpleGeometryLoader( void );

		/// \dtor
		virtual ~CSimpleGeometryLoader( void );

		DECL_IOBJECT_CLASS( CSimpleGeometryLoader , IGeometryLoader );

	public:

		//@ interface

		/// \brief	Loads a geometry.
		RefPass<IGeometry> OnLoad( RefWeak<IData> res , ResourceLoader& loader );
	};

	/*! 
		\class	CGeometryLoader
		\brief	For general geometry load.
	*/
	class CGeometryLoader : public IGeometryLoader
	{
	public:

		/// \ctor
		CGeometryLoader( void );

		/// \dtor
		virtual ~CGeometryLoader( void );

		DECL_IOBJECT_CLASS( CGeometryLoader , IGeometryLoader );

	public:

		//@ interface

		/// \brief	Loads a geometry.
		RefPass<IGeometry> OnLoad( RefWeak<IData> res , ResourceLoader& loader );
	};

} // namespace xeres
